package com.example.demo.mapper;

import com.example.demo.admin.pojo.Files;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface UploadMapper {
    @Insert("INSERT INTO files(file_name,file_size,url,create_time) values (#{fileName},#{fileSize},#{url},#{createTime})")
    void addFile(Files files);

    Page<Files> list(String fileName);

    @Delete("delete from files where url=#{url}")
    void deleteFiles(String url);
}
